var str = '/edu/courses/{course_uuid}/chapters/{chapter_uuid}/lessons/{lesson_uuid}/notes/{note_uuid}'
var reg = /\{(\w+)\}/g;

str = str.replace(reg, (matched,cap1,location,groups) => {
    console.log(matched);
    console.log(cap1);
    console.log(location);
    console.log(groups);
    return '$'+ cap1;
})

console.log(str);